import angular from 'angular';
import uiRouter from '@uirouter/angularjs';
import ocLazyLoad from 'oclazyload';
import appRouter from './config/app.router';
import CoreModule from './core/core.module';
import uiBootstrap from 'angular-ui-bootstrap';
import ControllerModule from './controllers/index';
import ComponentsModule from './components/index';
// 主样式
import './assets/css/main.scss';
// app组件样式
import style from './app.scss';

const appComponent = {
  restrict: 'E',
  templateUrl: 'src/app.html',
  controller: function () {
    this.class = style;
  },
  controllerAs: 'app'
};

const providers = [uiRouter, ocLazyLoad, uiBootstrap, CoreModule, ControllerModule, ComponentsModule];
export default angular.module('seanApp', providers)
  .config(appRouter)
  .component('app', appComponent)
  .name;
